package com.jzo2o.customer.controller.operation;

import com.jzo2o.common.model.PageResult;
import com.jzo2o.customer.model.domain.WorkerCertificationAudit;
import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditPageQueryReqDTO;
import com.jzo2o.customer.service.WorkerCertficationAuditService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController("operationWorkerCertificationAuditController")
@RequestMapping("/operation/worker-certification-audit")
@Api(tags = "运营端 - 服务人员审核认证")
public class WorkerCertificationAuditController {
    @Autowired
    private WorkerCertficationAuditService workerCertficationAuditService;

    @GetMapping(path = "/page")
    @ApiOperation("审核服务人员认证分页查询")
    public PageResult<WorkerCertificationAudit> queryPageWorker(WorkerCertificationAuditPageQueryReqDTO dto) {
        return workerCertficationAuditService.queryPageWorker(dto);
    }

    @PutMapping(path = "/audit/{id}")
    @ApiOperation("审核服务人员认证信息")
    public void auditServicePersonnel(Integer certificationStatus, @PathVariable Long id, String rejectReason) {
        workerCertficationAuditService.auditServicePersonnel(certificationStatus,id,rejectReason);
    }
}
